/*
 * �����վ:http://www.mob.com
 * ����֧��QQ: 4006852216
 * �ٷ�΢��:ShareSDK   ������°汾�Ļ������ǽ����һʱ��ͨ��΢�Ž��汾�����������͸������ʹ�ù�������κ����⣬Ҳ����ͨ��΢��������ȡ��jϵ�����ǽ�����24Сʱ�ڸ���ظ���
 *
 * Copyright (c) 2013��com.nitago.screen.wxapirights reserved.
 */

package com.m7788.screen.wxapi;

import android.content.Intent;
import android.widget.Toast;
import cn.sharesdk.wechat.utils.WechatHandlerActivity;

import com.tencent.mm.sdk.modelmsg.WXAppExtendObject;
import com.tencent.mm.sdk.modelmsg.WXMediaMessage;

public class WXEntryActivity extends WechatHandlerActivity {

	public void onGetMessageFromWXReq(WXMediaMessage msg) {
		Intent iLaunchMyself = getPackageManager().getLaunchIntentForPackage(getPackageName());
		startActivity(iLaunchMyself);
	}

	public void onShowMessageFromWXReq(WXMediaMessage msg) {
		if (msg != null && msg.mediaObject != null
				&& (msg.mediaObject instanceof WXAppExtendObject)) {
			WXAppExtendObject obj = (WXAppExtendObject) msg.mediaObject;
			Toast.makeText(this, obj.extInfo, Toast.LENGTH_SHORT).show();
		}
	}

}
